package org.apache.flink.runtime.rest.messages.taskmanager;

import org.apache.flink.runtime.rest.HttpMethodWrapper;
import org.apache.flink.runtime.rest.messages.EmptyRequestBody;
import org.apache.flink.runtime.rest.messages.RuntimeUntypedResponseMessageHeaders;

public class ResourceProviderStdoutFileHeaders
        implements RuntimeUntypedResponseMessageHeaders<
                EmptyRequestBody, ResourceProviderMessageParameters> {

    private static final ResourceProviderStdoutFileHeaders INSTANCE = new ResourceProviderStdoutFileHeaders();

    private static final String URL =
            String.format("/resourceproviders/:%s/stdout", ResourceProviderIdPathParameter.KEY);

    private ResourceProviderStdoutFileHeaders() {}

    @Override
    public Class<EmptyRequestBody> getRequestClass() {
        return EmptyRequestBody.class;
    }

    @Override
    public ResourceProviderMessageParameters getUnresolvedMessageParameters() {
        return new ResourceProviderMessageParameters();
    }

    @Override
    public HttpMethodWrapper getHttpMethod() {
        return HttpMethodWrapper.GET;
    }

    @Override
    public String getTargetRestEndpointURL() {
        return URL;
    }

    public static ResourceProviderStdoutFileHeaders getInstance() {
        return INSTANCE;
    }
}
